﻿using System;
using CkSoftware.GroupMe.Sdk.Groups.Commands;
using Newtonsoft.Json;

namespace CkSoftware.GroupMe.Sdk.Groups.Dao
{
	/// <summary>
	/// The result data of the <see cref="GroupAddMemberResultsCommand" />.
	/// </summary>
	public class GroupMemberAddedData : GroupMemberData
	{
		/// <summary>
		/// Defines if the added user have installed the smartphone app.
		/// </summary>
		[JsonProperty(PropertyName = "app_installed")]
		public bool AppInstalled { get; set; }

		/// <summary>
		/// The Guid of the add-member operation.
		/// </summary>
		[JsonIgnore]
		public Guid Guid
		{
			get { return Guid.Parse(GuidString); }
		}

		/// <summary>
		/// The string representation of the add-member operation guid.
		/// </summary>
		[JsonProperty(PropertyName = "guid")]
		public string GuidString { get; set; }
	}
}